\(\int \frac {\csc ^6(x)}{i+\tan (x)} \, dx\) [10]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 37 \[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=-\frac {1}{2} \cot ^2(x)+\frac {1}{3} i \cot ^3(x)-\frac {\cot ^4(x)}{4}+\frac {1}{5} i \cot ^5(x) \]

[Out]

-1/2*cot(x)^2+1/3*I*cot(x)^3-1/4*cot(x)^4+1/5*I*cot(x)^5

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3597, 862, 76} \[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=\frac {1}{5} i \cot ^5(x)-\frac {\cot ^4(x)}{4}+\frac {1}{3} i \cot ^3(x)-\frac {\cot ^2(x)}{2} \]

[In]

Int[Csc[x]^6/(I + Tan[x]),x]

[Out]

-1/2*Cot[x]^2 + (I/3)*Cot[x]^3 - Cot[x]^4/4 + (I/5)*Cot[x]^5

Rule 76

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && EqQ[b*e + a*f, 0] &&  !(ILtQ[n
 + p + 2, 0] && GtQ[n + 2*p, 0])

Rule 862

Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)
^(m + p)*(f + g*x)^n*(a/d + (c/e)*x)^p, x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] && NeQ[e*f - d*g, 0] && EqQ[c
*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && EqQ[m + p, 0]))

Rule 3597

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^6 (i+x)} \, dx,x,\tan (x)\right ) \\ & = \text {Subst}\left (\int \frac {(-i+x)^2 (i+x)}{x^6} \, dx,x,\tan (x)\right ) \\ & = \text {Subst}\left (\int \left (-\frac {i}{x^6}+\frac {1}{x^5}-\frac {i}{x^4}+\frac {1}{x^3}\right ) \, dx,x,\tan (x)\right ) \\ & = -\frac {1}{2} \cot ^2(x)+\frac {1}{3} i \cot ^3(x)-\frac {\cot ^4(x)}{4}+\frac {1}{5} i \cot ^5(x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.11 \[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=-\frac {2}{15} i \cot (x)-\frac {1}{15} i \cot (x) \csc ^2(x)-\frac {\csc ^4(x)}{4}+\frac {1}{5} i \cot (x) \csc ^4(x) \]

[In]

Integrate[Csc[x]^6/(I + Tan[x]),x]

[Out]

((-2*I)/15)*Cot[x] - (I/15)*Cot[x]*Csc[x]^2 - Csc[x]^4/4 + (I/5)*Cot[x]*Csc[x]^4

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.76

\[-\frac {1}{4 \tan \left (x \right )^{4}}+\frac {i}{5 \tan \left (x \right )^{5}}+\frac {i}{3 \tan \left (x \right )^{3}}-\frac {1}{2 \tan \left (x \right )^{2}}\]

[In]

int(csc(x)^6/(I+tan(x)),x)

[Out]

-1/4/tan(x)^4+1/5*I/tan(x)^5+1/3*I/tan(x)^3-1/2/tan(x)^2

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (25) = 50\).

Time = 0.24 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.46 \[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=-\frac {4 \, {\left (30 \, e^{\left (6 i \, x\right )} - 10 \, e^{\left (4 i \, x\right )} + 5 \, e^{\left (2 i \, x\right )} - 1\right )}}{15 \, {\left (e^{\left (10 i \, x\right )} - 5 \, e^{\left (8 i \, x\right )} + 10 \, e^{\left (6 i \, x\right )} - 10 \, e^{\left (4 i \, x\right )} + 5 \, e^{\left (2 i \, x\right )} - 1\right )}} \]

[In]

integrate(csc(x)^6/(I+tan(x)),x, algorithm="fricas")

[Out]

-4/15*(30*e^(6*I*x) - 10*e^(4*I*x) + 5*e^(2*I*x) - 1)/(e^(10*I*x) - 5*e^(8*I*x) + 10*e^(6*I*x) - 10*e^(4*I*x)
+ 5*e^(2*I*x) - 1)

Sympy [F]

\[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=\int \frac {\csc ^{6}{\left (x \right )}}{\tan {\left (x \right )} + i}\, dx \]

[In]

integrate(csc(x)**6/(I+tan(x)),x)

[Out]

Integral(csc(x)**6/(tan(x) + I), x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.65 \[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=\frac {i \, {\left (30 i \, \tan \left (x\right )^{3} + 20 \, \tan \left (x\right )^{2} + 15 i \, \tan \left (x\right ) + 12\right )}}{60 \, \tan \left (x\right )^{5}} \]

[In]

integrate(csc(x)^6/(I+tan(x)),x, algorithm="maxima")

[Out]

1/60*I*(30*I*tan(x)^3 + 20*tan(x)^2 + 15*I*tan(x) + 12)/tan(x)^5

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.65 \[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=-\frac {30 \, \tan \left (x\right )^{3} - 20 i \, \tan \left (x\right )^{2} + 15 \, \tan \left (x\right ) - 12 i}{60 \, \tan \left (x\right )^{5}} \]

[In]

integrate(csc(x)^6/(I+tan(x)),x, algorithm="giac")

[Out]

-1/60*(30*tan(x)^3 - 20*I*tan(x)^2 + 15*tan(x) - 12*I)/tan(x)^5

Mupad [B] (verification not implemented)

Time = 4.41 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.73 \[ \int \frac {\csc ^6(x)}{i+\tan (x)} \, dx=\frac {{\mathrm {cot}\left (x\right )}^5\,1{}\mathrm {i}}{5}-\frac {{\mathrm {cot}\left (x\right )}^4}{4}+\frac {{\mathrm {cot}\left (x\right )}^3\,1{}\mathrm {i}}{3}-\frac {{\mathrm {cot}\left (x\right )}^2}{2} \]

[In]

int(1/(sin(x)^6*(tan(x) + 1i)),x)

[Out]

(cot(x)^3*1i)/3 - cot(x)^2/2 - cot(x)^4/4 + (cot(x)^5*1i)/5